package com.zhangyj.plugin;

public class StorageBase {

	private static final double POSITIVE_ZERO = 0.00001d;
	private static final double NEGATIVE_ZERO = -0.00001d;
	// 先进先出:后进先出:高进先出:低进先出:本期先进先出:本期后进先出;
	// 占六位
	/** 先进先出 */
	static final int FIRST_IN_FIRST_OUT = 0x1;
	/** 本期先进先出 */
	static final int BQ_FIRST_IN_FIRST_OUT = 0x2;
	/** 后进先出 */
	static final int LAST_IN_FIRST_OUT = 0x4;
	/** 本期后进先 */
	static final int BQ_LAST_IN_FIRST_OUT = 0x8;
	/** 高进先出 */
	static final int HIGH_IN_FIRST_OUT = 0x10;
	/** 低进先出 */
	static final int LOW_IN_FIRST_OUT = 0x20;

	// 加权移动,批号计价,批次核算,最高进价,最低进价,最后进价,固定成本,综合毛利
	/** 加权移动 */
	static final int JIA_QUAN_YI_DONG = 0x100;
	/** 批号计价 */
	static final int PI_HAO_JI_JIA = 0x200;
	/** 批次核算 */
	static final int PI_CI_HE_SUAN = 0x300;
	/** 最高进价 */
	static final int ZUI_GAO_JIN_JIA = 0x400;
	/** 最低进价 */
	static final int ZUI_DI_JIN_JIA = 0x500;
	/** 最后进价 */
	static final int ZUI_HOU_JIN_JIA = 0x600;
	/** 固定成本 */
	static final int GU_DING_CHENG_BENG = 0x700;
	/** 综合毛利 */
	static final int ZHONG_HE_MAO_LI = 0x800;

	// 业务标识：区分不同业务行为的标志，
	/** 业务标识:销售 */
	static final int YWBS_XIAO_SHOU = 0x1;
	/** 业务标识:外调出库 */
	static final int YWBS_WAI_DIAO_CHU_KU = 0x2;
	/** 业务标识:采购 */
	static final int YWBS_CAI_GOU = 0x3;
	/** 业务标识:外调入库 */
	static final int YWBS_WAI_DIAO_RU_KU = 0x4;
	/** 业务标识:采购退出 */
	static final int YWBS_CAI_GOU_TUI_CHU = 0x5;
	/** 业务标识:销售退回 */
	static final int YWBS_XIAO_SHOU_HUI_TUI = 0x6;
	/** 业务标识:外调退回 */
	static final int YWBS_WAI_DIAO_HUI_TUI = 0x7;
	/** 业务标识:外调退出 */
	static final int YWBS_WAI_DIAO_HUI_CHU = 0x8;

	protected boolean isZore(double num) {
		return num > NEGATIVE_ZERO && num < POSITIVE_ZERO;
	}

	protected boolean maxZore(double num) {
		return num > POSITIVE_ZERO;
	}

	protected boolean minZore(double num) {
		return num < NEGATIVE_ZERO;
	}
}
